package com.lanxin.hr.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2025-07-18
 */
@TableName("jc_basicdatavalue")
public class JcBasicdatavalue implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "oid", type = IdType.AUTO)
    private Integer oid;

    //type的枚举类
    public static enum Type{
        TYPE_1(1,"职位"),
        TYPE_2(2,"地点"),
        TYPE_3(3,"学历"),
        TYPE_4(4,"资产来源"),
        TYPE_5(5,"移动事由");

        //枚举的属性
        @EnumValue//关键注解，将id值存入数据库
        public final int id;//类型id
        public final String name;//类型名称

        //构造方法
        Type(int id, String name) {
            this.id = id;
            this.name = name;
        }

        //访问属性的方法
        public int getId() {
            return id;
        }
        public String getName() {
            return name;
        }
    };

    //对应数据库的type字段的实体
    @TableField("type")
    private int type;

    @TableField("name")
    private String name;

    @TableField("state")
    private String state;

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "JcBasicdatavalue{" +
            "oid=" + oid +
            ", type=" + type +
            ", name=" + name +
            ", state=" + state +
        "}";
    }
}
